<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script type="text/javascript">
    function showalert(inform){
        alert(inform);
    }

    function showconfirm(inform){
        confirm(inform);
    }

    function showprompt(inform){
        prompt(inform);
    }
    </script>
</head>
<body>
    <input type="button" value="提示信息框" onclick="showalert('我叫王升')">
    <input type="button" value="确认信息框" onclick="showalert('你确定你叫王升？')">
    <input type="button" value="输入信息框" onclick="alert(showprompt())">
</body>
</html>